package top.huntwolf.admin.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import top.huntwolf.admin.dao.BannerDao;
import top.huntwolf.admin.pojo.Banner;

import java.util.List;

@Service
@Transactional
public class BannerService {
    @Autowired
    BannerDao bannerDao;

    public List<Banner> searchAllBanner(){
        return bannerDao.selectAll();
    }
    public void deleteBanner(Integer id){
        bannerDao.delete(id);
    }
    public void insertBanner(String url){
        bannerDao.insert(url);
    }
}
